﻿using System.Reflection;

namespace Borg
{
    internal class DeregisterPlugsTask : Task<ExtensionTypeInfo>
    {
        public DeregisterPlugsTask(ExtensionTypeInfo obj, uint taskGroupId, Assembly initiator)
            : base(obj, taskGroupId, initiator)
        { }

        public override void Execute()
        {
            obj.InternalDeregisterPlugs(initiator, false);
        }

        public override string ToString()
        {
            return string.Format("{0}: {1}.InternalDeregisterPlugs()", taskGroupId, obj);
        }

        public override string Name
        {
            get { return string.Format("DeregisterPlugs({0})", obj.Name); }
        }
    }
}

